Skip to content

fix(deps): move to Go 1.27.4 and golang.org/x/crypto v0.59.0 - #191

Merged
dealako merged 5 commits into
mainfrom
fix/x-crypto-v0.59.0
Nov 24, 2026
Merged

dealako merged 5 commits into
mainfrom
fix/x-crypto-v0.59.0

Conversation

@dealako

@dealako dealako commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Bump golang.org/x/crypto from v0.55.0 to v0.59.0, the first tagged release without the openpgp packages flagged by GO-2026-5932.
  • Move the module to Go 1.27.4. Release images are built with the go.mod version, and 1.27.4 carries the crypto/x509 eMudhra CA distrust that shipped in 1.27.3.
  • Move MegaLinter to v10.2.0, whose bundled golangci-lint 2.15.0 is built with Go 1.27, and fix what the v10 linters report.

Ticket

No LFXV2 ticket. Tracked in:

Changes

Dependencies (go.mod, go.sum)

  • golang.org/x/crypto v0.55.0 to v0.59.0.
  • Minimum version selection also moves x/net v0.58.0 to v0.62.0, x/sys v0.47.0 to v0.50.0 and x/text v0.41.0 to v0.44.0. Through x/text v0.44.0 it moves x/mod v0.38.0 to v0.42.0, x/sync v0.22.0 to v0.25.0 (a direct dependency) and x/tools v0.48.0 to v0.52.0. No other module changed.
  • go directive 1.27.3 to 1.27.4. The Go version in DEVELOPMENT.md and the script READMEs is updated to match.
  • MegaLinter v10 runs osv-scanner, which the v9.1.0 Go flavor did not. It reported GHSA-q7gw-24fr-5p69 (otel sdk, sdk/log and trace 1.45.0, fixed in 1.47.0) and GO-2026-6865 (github.com/klauspost/compress 1.18.7, fixed in 1.20.2). The otel modules move together to 1.47.0 (otlplog exporters to v0.23.0) and klauspost/compress to 1.20.2. Minimum version selection also moves otelhttp v0.65.0 to v0.70.0, grpc-gateway v2.29.0 to v2.30.0, genproto, protobuf v1.36.11 to v1.36.12, testify v1.11.1 to v1.12.1, httpsnoop and mapstructure. otel 1.47.0 deprecates otel/log/global, so pkg/utils/otel.go now calls otel.SetLoggerProvider.

MegaLinter v10.2.0

  • Pin oxsecurity/megalinter/flavors/go@f2fe8c1… # v10.2.0. GOTOOLCHAIN: auto stays set.
  • Remove GO_GOLANGCI_LINT_PRE_COMMANDS, which installed golangci-lint 2.15.0 over the v9 bundle. v10.2.0 bundles that version.
  • Removed-linters cleanup: drop REPOSITORY_KICS_ARGUMENTS (KICS is gone in v10 and never ran in the v9.1.0 Go flavor), rename .gitleaks.toml and .gitleaksignore to the betterleaks names, and remove the markdown-link-check annotations.
  • Move the zizmor GITHUB_TOKEN allowlist into .mega-linter.yml as a YAML list.
  • Drop the three stale .grype.yaml suppressions. They waited on Go 1.25, and go.mod already has the fixed otel v1.45.0, aws-sdk-go-v2/service/s3 v1.97.3 and aws/protocol/eventstream v1.7.8.

Fixes for v10 linter findings

  • zizmor template-injection: the ko build and cosign steps read step outputs and the ref name from env variables, not ${{ }} in run:.
  • zizmor cache-poisoning: cache: false on setup-go in the tagged release workflow.
  • zizmor ref-version-mismatch: checkout pin comments now give the full tag (# v5.0.0).
  • zizmor unpinned-uses and github-app: inline suppressions with a reason. The SLSA generator needs a tag ref, and the app token is scoped by repositories:.
  • hadolint DL3066: Dockerfile uses the numeric nonroot UID 65532.

Agent guidance (AGENTS.md)

  • The "Go Toolchain Version" section is replaced with a "Go version" section. It says the repo targets Go 1.27.x, supersedes the lfx-megalinter skill's latest-minus-one policy, and explains how MegaLinter handles a Go 1.27 module: golangci-lint lints it, and osv-scanner falls back to version matching. Please review this policy change on purpose.

Checks run

  • make check (gofmt, golangci-lint 2.15.0, license headers): pass, 0 issues.
  • make test (-race): pass.
  • go build ./..., the Makefile build and build-cli compile lines, go vet ./..., make apigen: pass. make build itself was not used because its clean step runs go clean -cache, which clashed with other builds on the same machine.
  • zizmor 1.25.0 (the version MegaLinter v10.2.0 bundles), online: no findings. actionlint: pass. yamllint: no errors (the remaining warnings already exist on main).
  • .mega-linter.yml validates against the v10.2.0 configuration schema.
  • osv-scanner v2.3.8 (scan source --lockfile go.mod) after the otel and compress bumps: no issues.
  • Local MegaLinter v10.2.0 run: actionlint, zizmor, hadolint, revive, betterleaks, secretlint, trufflehog and yamllint pass. golangci-lint, grype, osv-scanner, trivy, checkov and v8r hit the 300s linter timeout under local amd64 emulation, and git_diff cannot see a git worktree from inside the container. The CI run on this PR is the check for those.
  • Pre-PR review (LFX round: general, security and knowledge-base reviewers, plus GPT, CodeRabbit and Greptile): one minor finding (a wrong zizmor audit name in a comment), fixed in the last commit.

Notes

  • Dockerfile.cli still has USER nonroot. hadolint's file pattern ((.*\.)?Dockerfile) does not match Dockerfile.cli, so it was left unchanged.

🤖 Generated with Claude Code

dealako and others added 4 commits November 18, 2026 15:50
Address GO-2026-5932: x/crypto v0.59.0 is the first tagged release
without the flagged openpgp packages. Tracked in
linuxfoundation/lfx-self-serve-ops#1395.

Minimum version selection also moves x/net to v0.62.0, x/sys to
v0.50.0, x/text to v0.44.0, and through x/text, x/mod to v0.42.0,
x/sync to v0.25.0 and x/tools to v0.52.0. The go directive stays at
1.27.3, which already includes the eMudhra CA distrust fix.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: David Deal <ddeal@linuxfoundation.org>
Set the go directive to 1.27.4, the latest Go 1.27 patch, and update
the Go version stated in AGENTS.md, DEVELOPMENT.md and the script
READMEs. Release images are built with the go.mod version, and 1.27.4
carries the crypto/x509 eMudhra CA distrust that shipped in 1.27.3.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: David Deal <ddeal@linuxfoundation.org>
Pin MegaLinter v10.2.0. Its bundled golangci-lint 2.15.0 is built with
Go 1.27.0, so drop the pre-command that installed golangci-lint 2.15.0
over the v9 bundle. GOTOOLCHAIN=auto stays set so the Go linters
download the go.mod toolchain.

Clean up config for linters v10 removed: drop REPOSITORY_KICS_ARGUMENTS,
move .gitleaks.toml to .betterleaks.toml, and remove the
markdown-link-check annotations. Move the zizmor GITHUB_TOKEN allowlist
into .mega-linter.yml as a list.

Fix what the v10 linters report:
- zizmor template-injection: pass step outputs and the ref name to the
  ko build and cosign steps through env variables
- zizmor cache-poisoning: disable the setup-go cache in the release
  workflow
- zizmor ref-version-mismatch: give the checkout pins their full tag
- zizmor unpinned-uses and github-app: suppress inline with a reason;
  the SLSA generator needs a tag ref and the app token is scoped by
  repositories
- hadolint DL3066: use the numeric nonroot UID

Replace the AGENTS.md Go toolchain section with a Go version section
that targets Go 1.27.x and supersedes the lfx-megalinter skill's
latest-minus-one policy.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: David Deal <ddeal@linuxfoundation.org>
- Correct the zizmor GITHUB_TOKEN comment: the token is for the online
  audits such as ref-version-mismatch and impostor-commit, not
  artipacked.
- Rename .gitleaksignore to .betterleaksignore to finish the gitleaks
  to betterleaks migration.
- Drop the stale .grype.yaml suppressions. They waited on Go 1.25, and
  go.mod already has the fixed otel v1.45.0, aws-sdk-go-v2/service/s3
  v1.97.3 and aws/protocol/eventstream v1.7.8.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: David Deal <ddeal@linuxfoundation.org>
@dealako
dealako requested a review from a team as a code owner November 19, 2026 04:07
@dealako dealako added the ai-assisted A task or activity that was supported by AI, such as CoPilot, ChatGPT, or other AI technology. label Nov 19, 2026
Copilot AI balanced review requested due to automatic review settings November 19, 2026 04:07
Comment thread go.mod
Comment thread go.mod
Comment thread go.mod
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes update the Go directive and dependencies, revise Go and linter guidance, adjust container build and signing workflow inputs, upgrade MegaLinter, and update scanner, runtime-user, and Markdown lint configuration.

Changes

Repository maintenance updates

Layer / File(s) Summary
Go version, dependencies, and guidance
go.mod, AGENTS.md, DEVELOPMENT.md, scripts/load_mock_data/README.md, scripts/root-project-setup/README.md
The Go directive and documented prerequisites change to Go 1.27.4. AGENTS.md updates its Go patch policy and documents linter compatibility constraints. Several Go dependencies are upgraded.
MegaLinter and Go linter setup
.github/workflows/mega-linter.yml, .mega-linter.yml
MegaLinter changes from v9.1.0 to v10.2.0. The Go toolchain comments are updated, the golangci-lint pre-command is removed, and GITHUB_TOKEN is configured for Zizmor audits.
Container build and signing workflows
.github/workflows/ko-build-branch.yaml, .github/workflows/ko-build-main.yaml, .github/workflows/ko-build-tag.yaml
The workflows use environment variables for prepared image tags and signing inputs. The tag workflow disables Go setup caching and adds Zizmor annotations. Checkout version comments are updated.
Scanner, runtime, and Markdown configuration
.betterleaks.toml, .grype.yaml, Dockerfile, README.md, scripts/load_mock_data/README.md
The betterleaks title and path pattern change, the Grype ignore list is emptied, and the Dockerfile sets UID 65532. Markdown link-check suppression comments are removed or replaced.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Merge Risk: Minimal · up to 0ee52

This PR updates the Go toolchain, dependencies, linter setup and CI workflow settings. No concrete defect was identified. The one open item is confirming that the CI scanners pass on this revision.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two main changes: the move to Go 1.27.4 and the golang.org/x/crypto bump to v0.59.0. The description and raw summary both confirm these as core parts of the changeset, although the…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is specific and tied to the changeset. It names the golang.org/x/crypto bump and the Go 1.27.4 move, which match the go.mod and documentation edits in the summary. It also covers the M…
Full details: Title check

Explanation

The title names the two main changes: the move to Go 1.27.4 and the golang.org/x/crypto bump to v0.59.0. The description and raw summary both confirm these as core parts of the changeset, although the MegaLinter v10.2.0 upgrade and the linter fixes are not mentioned in the title.

Full details: Description check

Explanation

The description is specific and tied to the changeset. It names the golang.org/x/crypto bump and the Go 1.27.4 move, which match the go.mod and documentation edits in the summary. It also covers the MegaLinter v10.2.0 upgrade, the zizmor and hadolint fixes, the AGENTS.md policy change, and the test results. The description does not match the raw summary in every detail: it lists an otel and klauspost/compress update that the raw summary does not mention. That gap is minor and does not make the description off-topic.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: a88877a5-a566-49d9-b468-8817c196ae69
Commits

Reviewing files that changed from the base of the PR and between eaf7137 and 0ee5245.

Files ignored due to path filters: 1

  • go.sum is excluded by !**/*.sum
Files selected for processing: 15

  • .betterleaks.toml
  • .betterleaksignore
  • .github/workflows/ko-build-branch.yaml
  • .github/workflows/ko-build-main.yaml
  • .github/workflows/ko-build-tag.yaml
  • .github/workflows/mega-linter.yml
  • .grype.yaml
  • .mega-linter.yml
  • AGENTS.md
  • DEVELOPMENT.md
  • Dockerfile
  • README.md
  • go.mod
  • scripts/load_mock_data/README.md
  • scripts/root-project-setup/README.md

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

@lfx-one

lfx-one commented Nov 19, 2026 •

Copy link
Copy Markdown

@dealako I'm starting review 1 of this pull request now (started 2026-11-19 04:07 UTC using review agent v0.1.34). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by re-review, to start another. For help with the review agent, see https://github.com/linuxfoundation/lfx-review-agent/issues.


Thanks, David, for the careful, well-documented PR.

Summary

This PR bumps golang.org/x/crypto to v0.59.0 and the module to Go 1.27.4. It also moves MegaLinter to v10.2.0 and fixes the findings the new linters report. The changes are consistent and low-risk.

Decision

✅ Approved

Details

Overall impression: The dependency changes in go.mod and go.sum match the PR description. The workflow changes move ${{ }} expressions out of run: blocks into env:, which is a real hardening step, and cache: false on the tagged release job reduces cache-poisoning risk. All actions stay pinned to full SHAs. The two inline zizmor suppressions carry reasons: the SLSA generator needs a tag ref, and the app token is scoped by repositories:. The .grype.yaml suppressions were removed because go.mod already has the fixed versions. The AGENTS.md Go version policy change is deliberate and explained, as the PR asks.

Other reviewers and CI checks: the github-license-compliance bot flagged go.mod for the x/* modules' BSD-3-Clause license plus the Go patent grant. Those are the standard Go licenses, so any fix is a license-policy allowlist matter, not a code change. The required check DCO passed. CodeRabbit was still running when I read the checks.

Rule files: read none; AGENTS.md (over 24,000 bytes) skipped; no CLAUDE.md, CONTRIBUTING.md or .claude/rules/ found

Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Updates Go and security-related dependencies, moves CI to MegaLinter v10.2.0, and adjusts OpenTelemetry setup.

  • The service builds with Go 1.27.4 and newer security dependencies.
  • CI uses MegaLinter v10.2.0 and updated scan settings.
  • Release workflows pass build and signing values through environment variables.
  • The container and setup guides use the current lint rules.

No new actionable issues were found in the changes since the previous review.

Reviews (2) · Last reviewed commit: "fix(deps): patch otel and klauspost/comp..." · Reviewed by Greptile

lfx-one
lfx-one previously approved these changes Nov 19, 2026

@lfx-one lfx-one left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependency bump, Go 1.27.4 move and MegaLinter v10.2.0 migration look correct. I found no blocking, security or minor issues, so I'm approving.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The Go-version policy and OSV version-only scanning tradeoff need maintainer acceptance, and the full MegaLinter security-scanner CI run remains unconfirmed after local scanner timeouts.

No open issues 🎉

What changed in this PR

This PR updates the project service’s Go toolchain and dependencies to address security advisories, migrates CI to MegaLinter v10.2.0, and aligns supporting configuration and documentation.

Changes:

  • Upgrade Go to 1.27.4 and golang.org/x/crypto to v0.59.0, with related dependency updates.
  • Adopt MegaLinter v10.2.0, migrate secret-scanner configuration, and remove obsolete suppressions.
  • Harden release workflow shell inputs and caching, use a numeric container UID, and document the Go version policy.
File Description
scripts/​root-project-setup/​README.md Update the Go prerequisite.
scripts/​load_mock_data/​README.md Update Go prerequisite and remove an obsolete annotation.
README.md Remove obsolete link-check annotations.
go.sum Refresh checksums for updated dependencies.
go.mod Upgrade Go and related golang.org/x dependencies.
Dockerfile Specify the numeric nonroot UID.
DEVELOPMENT.md Align the documented Go prerequisite.
AGENTS.md Revise Go version policy and explain linter compatibility.
.mega-linter.yml Configure zizmor token access and remove obsolete settings.
.grype.yaml Remove stale vulnerability suppressions.
.github/​workflows/​mega-linter.yml Pin MegaLinter v10.2.0 and clarify toolchain handling.
.github/​workflows/​ko-build-tag.yaml Harden shell inputs, disable Go caching, and explain audit exceptions.
.github/​workflows/​ko-build-main.yaml Clarify the existing checkout pin’s version comment.
.github/​workflows/​ko-build-branch.yaml Pass image tags through quoted environment variables.
.betterleaksignore Carry forward secret-scanner fixture exclusions.
.betterleaks.toml Adapt secret-scanner configuration to Betterleaks.

Review effort: Balanced

MegaLinter v10 runs osv-scanner, which the v9.1.0 Go flavor did not,
and its govulncheck call analysis cannot load a Go 1.27 module, so it
matches advisories by version. It reported:

- GHSA-q7gw-24fr-5p69 in go.opentelemetry.io/otel sdk, sdk/log and
  trace 1.45.0, fixed in 1.47.0
- GO-2026-6865 in github.com/klauspost/compress 1.18.7, fixed in 1.20.2

Move the otel modules together to 1.47.0 (otlplog exporters to
v0.23.0) and klauspost/compress to 1.20.2. Minimum version selection
also moves otelhttp, grpc-gateway, genproto, protobuf, testify,
httpsnoop and mapstructure. The go directive stays at 1.27.4.

otel 1.47.0 deprecates go.opentelemetry.io/otel/log/global, so set the
logger provider with otel.SetLoggerProvider.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: David Deal <ddeal@linuxfoundation.org>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 04:20
@lfx-one

lfx-one commented Nov 19, 2026 •

Copy link
Copy Markdown

@dealako I'm starting review 2 of this pull request now (started 2026-11-19 04:20 UTC using review agent v0.1.34). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by re-review, to start another. For help with the review agent, see https://github.com/linuxfoundation/lfx-review-agent/issues.


Thanks, David, for following up so quickly on the osv-scanner findings.

Summary

This follow-up moves the otel modules to 1.47.0 and klauspost/compress to 1.20.2, which clears the two advisories MegaLinter v10 reported. It also switches pkg/utils/otel.go to otel.SetLoggerProvider. The change is small and consistent with the PR description.

Decision

✅ Approved

Details

Overall impression: The new commit (13424c8) only touches go.mod, go.sum and pkg/utils/otel.go. The otel modules move together, and otel/log is now a direct dependency at v1.47.0 (the sdk/log and exporter modules sit on the matching v1.47.0 and v0.23.0 lines). In otel.go the removed otel/log/global import is replaced by otel.SetLoggerProvider, and the otel package was already imported. go.sum matches the go.mod changes. The go.mod file is not in the exclusion or lockfile skip tables, and go.sum was reviewed from its patch. I did not run the build or the tests.

👏 Nice work: You reproduced the scanner findings, bumped the affected modules together, and recorded the Go 1.26 govulncheck fallback in AGENTS.md and the commit message.

Prior feedback: Review 1 had no findings, so there is nothing to track. GitHub dismissed my earlier approval when the new commit was pushed.

Other reviewers and CI checks: The required check DCO passed on 13424c8. The CodeRabbit status reads "Review rate limited" and reports success, so it gave no review of this commit. The github-license-compliance bot's three go.mod license-policy alerts (BSD-3-Clause with the Go patent grant) still stand. They were raised on the earlier commit and are a license-policy allowlist matter, not a code change.

Rule files: read none; skipped AGENTS.md (over 24,000 bytes); no CLAUDE.md, CONTRIBUTING.md or .claude/rules/ found

Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues

@lfx-one lfx-one left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit moves the otel modules to 1.47.0 and klauspost/compress to 1.20.2, and switches pkg/utils/otel.go to otel.SetLoggerProvider. I found no blocking, security or minor issues, so I'm approving.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the toolchain, dependency, and CI updates.

No open issues 🎉

Review effort: Balanced

@dealako
dealako added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 2f2dd6f Nov 24, 2026
12 checks passed
@dealako
dealako deleted the fix/x-crypto-v0.59.0 branch November 24, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted A task or activity that was supported by AI, such as CoPilot, ChatGPT, or other AI technology.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants